package ru.acme.lab10;

import ru.acme.lab10.domain.account.CheckingAccount;
import ru.acme.lab10.domain.account.SavingAccount;
import ru.acme.lab10.domain.bank.Bank;
import ru.acme.lab10.domain.client.Client;
import ru.acme.lab10.domain.client.ClientRegistrationListener;
import ru.acme.lab10.domain.client.Gender;
import ru.acme.lab10.service.bank.BankService;

public class BankApplication {
	
	public static void main(String[] argv) {
		Bank bank = new Bank(new ClientRegistrationListener[] {
				new Bank.EmailNotificationListener(), new Bank.PrintClientListener()});
			
		BankService.addClient(bank, new Client("A", Gender.MALE, new SavingAccount(30)));
		BankService.addClient(bank, new Client("B", Gender.MALE, new SavingAccount(30)));
		BankService.addClient(bank, new Client("C", Gender.FEMALE, new SavingAccount(30)));
		BankService.addClient(bank, new Client("D", Gender.FEMALE, new SavingAccount(30)));
		BankService.addClient(bank, new Client("F", Gender.MALE, new SavingAccount(30)));
		BankService.addClient(bank, new Client("G", Gender.MALE, new CheckingAccount(30, 20)));
		BankService.addClient(bank, new Client("H", Gender.FEMALE, new CheckingAccount(30, 20)));
		BankService.addClient(bank, new Client("I", Gender.FEMALE, new CheckingAccount(30, 20)));
		BankService.addClient(bank, new Client("J", Gender.MALE, new CheckingAccount(30, 20)));
		BankService.addClient(bank, new Client("K", Gender.MALE, new CheckingAccount(30, 20)));
		
		BankService.printBalances(bank);
		BankService.printMaximumAmountsToWithdraw(bank);
		BankService.modifyBank(bank);
		BankService.printBalances(bank);		
		BankService.printMaximumAmountsToWithdraw(bank);
	}

}
